<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.6.1" />

	<title>Class DibiObject | Dibi 2.0.2 API documentation</title>

	<script type="text/javascript" src="resources/combined.js?3201557540"></script>
	<script type="text/javascript" src="elementlist.js?236042691"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?1321461267" />
	<link rel="search" type="application/opensearchdescription+xml" title="Dibi 2.0.2 API documentation" href="http://api.dibiphp.com/2.0/opensearch.xml" />

</head>

<body>
<div id="left">
	<div id="menu">

		<div id="groups">
			<h3>Packages</h3>
			<ul>
				<li class="active"><a href="package-dibi.html">dibi<span></span></a>
						<ul>
				<li><a href="package-dibi.drivers.html">drivers</a>
						</li>
				<li><a href="package-dibi.nette.html">nette</a>
						</li>
				<li><a href="package-dibi.reflection.html">reflection</a>
						</li>
							</ul></li>
				<li><a href="package-None.html">None</a>
						</li>
				<li><a href="package-PHP.html">PHP</a>
						</li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="dibi.html">dibi</a></li>
				<li><a href="DibiConnection.html">DibiConnection</a></li>
				<li><a href="DibiDataSource.html">DibiDataSource</a></li>
				<li><a href="DibiDateTime.html">DibiDateTime</a></li>
				<li><a href="DibiEvent.html">DibiEvent</a></li>
				<li><a href="DibiFileLogger.html">DibiFileLogger</a></li>
				<li><a href="DibiFirePhpLogger.html">DibiFirePhpLogger</a></li>
				<li><a href="DibiFluent.html">DibiFluent</a></li>
				<li class="active"><a href="DibiObject.html">DibiObject</a></li>
				<li><a href="DibiResult.html">DibiResult</a></li>
				<li><a href="DibiResultIterator.html">DibiResultIterator</a></li>
				<li><a href="DibiRow.html">DibiRow</a></li>
				<li><a href="DibiTranslator.html">DibiTranslator</a></li>
			</ul>

			<h3>Interfaces</h3>
			<ul>
				<li><a href="IDataSource.html">IDataSource</a></li>
				<li><a href="IDibiDriver.html">IDibiDriver</a></li>
				<li><a href="IDibiReflector.html">IDibiReflector</a></li>
				<li><a href="IDibiResultDriver.html">IDibiResultDriver</a></li>
			</ul>


			<h3>Exceptions</h3>
			<ul>
				<li><a href="DibiDriverException.html">DibiDriverException</a></li>
				<li><a href="DibiException.html">DibiException</a></li>
				<li><a href="DibiNotImplementedException.html">DibiNotImplementedException</a></li>
				<li><a href="DibiNotSupportedException.html">DibiNotSupportedException</a></li>
				<li><a href="DibiPcreException.html">DibiPcreException</a></li>
			</ul>


		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form action="http://www.google.com/cse" id="search">
		<input type="hidden" name="cx" value="011549293477758430224:x_apk4yrmjm" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="hidden" name="more" value="api" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="package-dibi.html" title="Summary of dibi"><span>Package</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class DibiObject</h1>


	<div class="description">
	
<p>DibiObject is the ultimate ancestor of all instantiable classes.</p>

<p>DibiObject is copy of Nette\Object from Nette Framework (<a
href="http://nette.org">http://nette.org</a>).</p>

<p>It defines some handful methods and enhances object core of PHP: - access to
undeclared members throws exceptions - support for conventional properties with
getters and setters - support for event raising functionality - ability to add
new methods to class (extension methods)</p>

<p>Properties is a syntactic sugar which allows access public getter and setter
methods as normal object variables. A property is defined by a getter method and
optional setter method (no setter method means read-only property).</p>

<pre>
<span class="php-var">$val</span> = <span
class="php-var">$obj</span>-&gt;label;     <span
class="php-comment">// equivalent to $val = $obj-&gt;getLabel();</span>
<span
class="php-var">$obj</span>-&gt;label = <span
class="php-quote">'Nette'</span>;  <span
class="php-comment">// equivalent to $obj-&gt;setLabel('Nette');</span>
</pre>

<p>Property names are case-sensitive, and they are written in the camelCaps or
PascalCaps.</p>

<p>Event functionality is provided by declaration of property named
'on{Something}' Multiple handlers are allowed.</p>

<pre>
<span class="php-keyword1">public</span> <span
class="php-var">$onClick</span>;                <span
class="php-comment">// declaration in class</span>
<span
class="php-var">$this</span>-&gt;onClick[] = <span
class="php-quote">'callback'</span>;  <span
class="php-comment">// attaching event handler</span>
<span
class="php-keyword1">if</span> (!<span class="php-keyword1">empty</span>(<span
class="php-var">$this</span>-&gt;onClick)) ... <span
class="php-comment">// are there any handlers?</span>
<span
class="php-var">$this</span>-&gt;onClick(<span
class="php-var">$sender</span>, <span class="php-var">$arg</span>);  <span
class="php-comment">// raises the event with arguments</span>
</pre>

<p>Adding method to class (i.e. to all instances) works similar to JavaScript
prototype property. The syntax for adding a new method is:</p>

<pre>
MyClass::extensionMethod(<span class="php-quote">'newMethod'</span>, <span
class="php-keyword1">function</span>(MyClass <span
class="php-var">$obj</span>, <span
class="php-var">$arg</span>, ...) { ... });
<span
class="php-var">$obj</span> = <span
class="php-keyword1">new</span> MyClass;
<span
class="php-var">$obj</span>-&gt;newMethod(<span
class="php-var">$x</span>);
</pre>

	</div>



	<div>
		<h4>Direct known subclasses</h4>
			<a href="DibiColumnInfo.html">DibiColumnInfo</a>, 
			<a href="DibiConnection.html">DibiConnection</a>, 
			<a href="DibiLiteral.html">DibiLiteral</a>, 
			<a href="DibiMsSql2005Driver.html">DibiMsSql2005Driver</a>, 
			<a href="DibiMsSqlDriver.html">DibiMsSqlDriver</a>, 
			<a href="DibiMySqlDriver.html">DibiMySqlDriver</a>, 
			<a href="DibiMySqliDriver.html">DibiMySqliDriver</a>, 
			<a href="DibiNettePanel.html">DibiNettePanel</a>, 
			<a href="DibiOdbcDriver.html">DibiOdbcDriver</a>, 
			<a href="DibiOracleDriver.html">DibiOracleDriver</a>, 
			<a href="DibiPdoDriver.html">DibiPdoDriver</a>, 
			<a href="DibiPostgreDriver.html">DibiPostgreDriver</a>, 
			<a href="DibiDatabaseInfo.html">DibiDatabaseInfo</a>, 
			<a href="DibiResult.html">DibiResult</a>, 
			<a href="DibiResultInfo.html">DibiResultInfo</a>, 
			<a href="DibiSqlite3Driver.html">DibiSqlite3Driver</a>, 
			<a href="DibiSqliteDriver.html">DibiSqliteDriver</a>, 
			<a href="DibiTableInfo.html">DibiTableInfo</a>, 
			<a href="DibiTranslator.html">DibiTranslator</a>, 
			<a href="DibiDataSource.html">DibiDataSource</a>, 
			<a href="DibiFileLogger.html">DibiFileLogger</a>, 
			<a href="DibiFirebirdDriver.html">DibiFirebirdDriver</a>, 
			<a href="DibiFirePhpLogger.html">DibiFirePhpLogger</a>, 
			<a href="DibiFluent.html">DibiFluent</a>, 
			<a href="DibiForeignKeyInfo.html">DibiForeignKeyInfo</a>, 
			<a href="DibiIndexInfo.html">DibiIndexInfo</a>
	</div>






	<div class="info">
		<b>Abstract</b><br />
		
		
		<b>Package:</b> <a href="package-dibi.html">dibi</a><br />

				<b>Author:</b>
				David Grudl<br />
		<b>Located at</b> <a href="source-libs.DibiObject.php.html#14" title="Go to source code">libs/DibiObject.php</a><br />
	</div>


	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="getClass" id="_getClass">

		<td class="attributes"><code>
			final public 
			string
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getClass">#</a>
		<code><a href="source-libs.DibiObject.php.html#62" title="Go to source code">getClass</a>( )</code>

		<div class="description short">
			
<p>Returns the name of the class of this object.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Returns the name of the class of this object.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>string</code><br />
				</div>



		</div>
		</div></td>
	</tr>
	<tr data-order="getReflection" id="_getReflection">

		<td class="attributes"><code>
			final public 
			<code><a href="ReflectionObject.html">ReflectionObject</a></code>
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getReflection">#</a>
		<code><a href="source-libs.DibiObject.php.html#73" title="Go to source code">getReflection</a>( )</code>

		<div class="description short">
			
<p>Access to reflection.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Access to reflection.</p>




				<h4>Returns</h4>
				<div class="list">
					<code><code><a href="ReflectionObject.html">ReflectionObject</a></code></code><br />
				</div>



		</div>
		</div></td>
	</tr>
	<tr data-order="__call" id="___call">

		<td class="attributes"><code>
			 public 
			mixed
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___call">#</a>
		<code><a href="source-libs.DibiObject.php.html#84" title="Go to source code">__call</a>( <span>string <var>$name</var></span>, <span>array <var>$args</var></span> )</code>

		<div class="description short">
			
<p>Call to undefined method.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Call to undefined method.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br>method name</dd>
					<dt><var>$args</var></dt>
					<dd><code>array</code><br>arguments</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>mixed</code><br />
				</div>

				<h4>Throws</h4>
				<div class="list">
					<code><code><a href="LogicException.html">LogicException</a></code></code><br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="__callStatic" id="___callStatic">

		<td class="attributes"><code>
			 public static
			mixed
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___callStatic">#</a>
		<code><a href="source-libs.DibiObject.php.html#129" title="Go to source code">__callStatic</a>( <span>string <var>$name</var></span>, <span>array <var>$args</var></span> )</code>

		<div class="description short">
			
<p>Call to undefined static method.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Call to undefined static method.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br>method name (in lower case!)</dd>
					<dt><var>$args</var></dt>
					<dd><code>array</code><br>arguments</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>mixed</code><br />
				</div>

				<h4>Throws</h4>
				<div class="list">
					<code><code><a href="LogicException.html">LogicException</a></code></code><br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="extensionMethod" id="_extensionMethod">

		<td class="attributes"><code>
			 public static
			mixed
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_extensionMethod">#</a>
		<code><a href="source-libs.DibiObject.php.html#144" title="Go to source code">extensionMethod</a>( <span>string <var>$name</var></span>, <span>mixed <var>$callback</var> = <span class="php-keyword1">NULL</span></span> )</code>

		<div class="description short">
			
<p>Adding method to class.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Adding method to class.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br>method name</dd>
					<dt><var>$callback</var></dt>
					<dd><code>mixed</code><br>callback or closure</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>mixed</code><br />
				</div>



		</div>
		</div></td>
	</tr>
	<tr data-order="__get" id="___get">

		<td class="attributes"><code>
			 public 
			mixed
			&amp;
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___get">#</a>
		<code><a href="source-libs.DibiObject.php.html#206" title="Go to source code">__get</a>( <span>string <var>$name</var></span> )</code>

		<div class="description short">
			
<p>Returns property value. Do not call directly.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Returns property value. Do not call directly.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br>property name</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>mixed</code><br>property value<br />
				</div>

				<h4>Throws</h4>
				<div class="list">
					<code><code><a href="LogicException.html">LogicException</a></code></code><br>if the property is not defined.<br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="__set" id="___set">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___set">#</a>
		<code><a href="source-libs.DibiObject.php.html#243" title="Go to source code">__set</a>( <span>string <var>$name</var></span>, <span>mixed <var>$value</var></span> )</code>

		<div class="description short">
			
<p>Sets value of a property. Do not call directly.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Sets value of a property. Do not call directly.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br>property name</dd>
					<dt><var>$value</var></dt>
					<dd><code>mixed</code><br>property value</dd>
				</dl></div>


				<h4>Throws</h4>
				<div class="list">
					<code><code><a href="LogicException.html">LogicException</a></code></code><br>if the property is not defined or is read-only<br />
				</div>


		</div>
		</div></td>
	</tr>
	<tr data-order="__isset" id="___isset">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___isset">#</a>
		<code><a href="source-libs.DibiObject.php.html#278" title="Go to source code">__isset</a>( <span>string <var>$name</var></span> )</code>

		<div class="description short">
			
<p>Is property defined?</p>

		</div>

		<div class="description detailed hidden">
			
<p>Is property defined?</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br>property name</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>



		</div>
		</div></td>
	</tr>
	<tr data-order="__unset" id="___unset">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___unset">#</a>
		<code><a href="source-libs.DibiObject.php.html#291" title="Go to source code">__unset</a>( <span>string <var>$name</var></span> )</code>

		<div class="description short">
			
<p>Access to undeclared property.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Access to undeclared property.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$name</var></dt>
					<dd><code>string</code><br>property name</dd>
				</dl></div>


				<h4>Throws</h4>
				<div class="list">
					<code><code><a href="LogicException.html">LogicException</a></code></code><br />
				</div>


		</div>
		</div></td>
	</tr>
	</table>










</div>

	<div id="footer">
		Dibi 2.0.2 API documentation API documentation generated by <a href="http://apigen.org">ApiGen 2.6.1</a>
	</div>
</div>
</div>
</body>
</html>
